package com.egao.gps.entity;

import com.egao.orderB.entity.AddressFactory;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.List;

/**
 * @author Damon
 * @create 2020-11-18 9:33
 */
@Document(collection = "carPosition")
public class CarPosition implements Cloneable {

    public CarPosition() {
    }
    public CarPosition(String lon, String lat) {
        this.lon = lon;
        this.lat = lat;
    }

    @Id
    private ObjectId id;//id
    @Indexed
    private String billId;//订单id
    private String billOfLading;//订单id
    @Indexed
    private String vno;//车牌
    private String vco;//字符串类型 1：蓝色；2：黄色
    @Field("lon")
    private String lon;//经度
    private String lat;//纬度
//    private String originalLon;//经度
//    private String originalLat;//纬度
    private String adr;//车辆位置
    @Indexed
    private String utc;//时间
    private String gtm;//历史轨迹gps时间
    private String spd;//速度 km/h
    private String hgt;//海拔
    private String mlg;//里程 单位：百米
    private String drc;//方向 字符串类型（0 或 360：正北， 大于 0 且小于 90：东北，等于
                        //90：正东，大于 90 且小于 180： 东南，等于 180：正南，大于 180 且小于 270：西南，等于
                        //270：正西，大于 270 且小于等 于 359：西北，其他：未知）
    private String province;//省
    private String country;//区
    private String city;//市
    private String createDate;//创建时间

    private String date1;//开始时间
    private String date2;//结束时间
    private String driver;//订单id
    private String driverPhone;//订单id
    private String customer;//客户名称
    private String type;//状态
    private String carTeam;//车队
    private String factoryAddress;//工厂地址
    private String address;//地址
    private String upyard;//地址
    private String upyardLongitude;//地址
    private String upyardLatitude;//地址
    private String dock;//地址
    private String dockLongitude;//地址
    private String dockLatitude;//地址
    private String state;//状态
    private String packDate;//装箱时间
    private String distance;//距离
    private String duration;//时间
    private int warn;//警告  1 约定时间超过1小时还到不了的,  2 没有提到箱子 0 正常
    private List<AddressFactory> addressFactoryList; //工厂地址 下单的时候要用





    @Override
    public CarPosition clone()  {
        try {
            return (CarPosition)super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }


    public String getHgt() {
        return hgt;
    }

    public void setHgt(String hgt) {
        this.hgt = hgt;
    }

    public String getMlg() {
        return mlg;
    }

    public void setMlg(String mlg) {
        this.mlg = mlg;
    }

    public String getPackDate() {
        return packDate;
    }

    public void setPackDate(String packDate) {
        this.packDate = packDate;
    }

    public int getWarn() {
        return warn;
    }

    public void setWarn(int warn) {
        this.warn = warn;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public List<AddressFactory> getAddressFactoryList() {
        return addressFactoryList;
    }

    public void setAddressFactoryList(List<AddressFactory> addressFactoryList) {
        this.addressFactoryList = addressFactoryList;
    }

    public String getUpyard() {
        return upyard;
    }

    public void setUpyard(String upyard) {
        this.upyard = upyard;
    }

    public String getUpyardLongitude() {
        return upyardLongitude;
    }

    public void setUpyardLongitude(String upyardLongitude) {
        this.upyardLongitude = upyardLongitude;
    }

    public String getUpyardLatitude() {
        return upyardLatitude;
    }

    public void setUpyardLatitude(String upyardLatitude) {
        this.upyardLatitude = upyardLatitude;
    }

    public String getDock() {
        return dock;
    }

    public void setDock(String dock) {
        this.dock = dock;
    }

    public String getDockLongitude() {
        return dockLongitude;
    }

    public void setDockLongitude(String dockLongitude) {
        this.dockLongitude = dockLongitude;
    }

    public String getDockLatitude() {
        return dockLatitude;
    }

    public void setDockLatitude(String dockLatitude) {
        this.dockLatitude = dockLatitude;
    }

    public String getFactoryAddress() {
        return factoryAddress;
    }

    public void setFactoryAddress(String factoryAddress) {
        this.factoryAddress = factoryAddress;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCarTeam() {
        return carTeam;
    }

    public void setCarTeam(String carTeam) {
        this.carTeam = carTeam;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getGtm() {
        return gtm;
    }

    public void setGtm(String gtm) {
        this.gtm = gtm;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public String getBillOfLading() {
        return billOfLading;
    }

    public void setBillOfLading(String billOfLading) {
        this.billOfLading = billOfLading;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getDriverPhone() {
        return driverPhone;
    }

    public void setDriverPhone(String driverPhone) {
        this.driverPhone = driverPhone;
    }

    public String getBillId() {
        return billId;
    }

    public void setBillId(String billId) {
        this.billId = billId;
    }

    public String getDate1() {
        return date1;
    }

    public void setDate1(String date1) {
        this.date1 = date1;
    }

    public String getDate2() {
        return date2;
    }

    public void setDate2(String date2) {
        this.date2 = date2;
    }

    public String getAdr() {
        return adr;
    }

    public void setAdr(String adr) {
        this.adr = adr;
    }

    public String getVno() {
        return vno;
    }

    public void setVno(String vno) {
        this.vno = vno;
    }

    public String getVco() {
        return vco;
    }

    public void setVco(String vco) {
        this.vco = vco;
    }

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public String getLon() {
        return lon;
    }

    public void setLon(String lon) {
        this.lon = lon;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getSpd() {
        return spd;
    }

    public void setSpd(String spd) {
        this.spd = spd;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getDrc() {
        return drc;
    }

    public void setDrc(String drc) {
        this.drc = drc;
    }

    public String getUtc() {
        return utc;
    }

    public void setUtc(String utc) {
        this.utc = utc;
    }
}
